package com.ogawa.projectcommon.utils;

import com.alibaba.android.arouter.launcher.ARouter;
import com.ogawa.base.utils.SpUtil;
import com.ogawa.projectcommon.constants.Constant;
import com.ogawa.projectcommon.constants.UrlPathConstant;


//todo  添加设备型号需要修改的地方
public class ProjectUtils {


    public static void jumpToDeviceActivity(String codeType) {
        jumpToDeviceActivity(codeType, -1);
    }


    public static void jumpToDeviceActivity(String codeType, int flags) {
        SpUtil.Companion.set(SpUtil.IS_NEED_RE_CONNECT_MQTT, true);
        ProjectSpUtils.setCurDeviceTypeCode(codeType);
        if (Constant.TYPECODE_EC_3209G.equals(codeType)) {
            ARouter.getInstance().build(UrlPathConstant.ACTIVITY_3209E_DEVICE_MAIN)
                    .addFlags(flags)
                    .navigation();
        } else if (Constant.TYPECODE_EC_8506E.equals(codeType)||Constant.TYPECODE_EC_8506E_JPDC.equals(codeType)) {
            ARouter.getInstance().build(UrlPathConstant.ACTIVITY_8506E_MASSAGE)
                    .addFlags(flags)
                    .navigation();
        }else if (Constant.TYPECODE_EC_6602.equals(codeType)) {
            ARouter.getInstance().build(UrlPathConstant.ACTIVITY_6602_MASSAGE)
                    .addFlags(flags)
                    .navigation();
        }
    }
}
